//客户端快捷方式列表。
Ext.define("ES.view.clientshortcut.ClientShortcutList",{
    extend:"Ext.grid.Panel",
    alias:"widget.clientShortcutTabList",
    closable:true,
    title:"客户端快捷方式",
    store:"ClientShortcutStore",
    typeStore:null,
    statusStore:null,
    targetStore:null,
    selType:"checkboxmodel",
    multiSelect:true,
    frame:true,
    layout:{
        type:"fit",
        align:"stretch"
    },
    sortableColumns:false,
    viewConfig:{
        forceFit:true,
        columnLines:true,
        stripRows:true
    },
    tbar:{
       xtype:"toolbar",
       height:36,
       items:["快捷名称：",{
               xtype:"textfield",
               width:168
       }," ",{
               xtype:"button",
               action:"btnQuery",
               iconCls:'search-trigger-icon',
               text:"检索",
               tooltip:"检索数据"
       },"->",{
               xtype:"button",
               action:"btnAdd",
               iconCls:"add-icon",
               text:"新增",
               tooltip:"新增数据"
       },"-",{
               xtype:"button",
               action:"btnDelete",
               iconCls:"delete-icon",
               text:"删除",
               tooltip:"删除数据"
       }]
   },
   bbar:{
        xtype:"pagingtoolbar",
        store:"ClientShortcutStore",
        displayInfo:true
    },
   columns:[{
               header:"序号",
               width:32,
               align:"right",
               xtype:"rownumberer"
            },{
                text:"快捷方式名称",
                width:168,
                flex:1,
                align:"left",
                menuDisabled:true,
                sortable:false,
                dataIndex:"shortcutName"
            },{
                text:"所属科目",
                width:198,
                flex:2,
                align:"left",
                menuDisabled:true,
                sortable:false,
                dataIndex:"fullCatalogName"
            },{
                text:"链接地址",
                width:198,
                flex:2,
                align:"left",
                menuDisabled:true,
                sortable:false,
                dataIndex:"linkAddress"
            },{
                text:"快捷类型",
                width:80,
                align:"center",
                menuDisabled:true,
                sortable:false,
                dataIndex:"type",
                renderer:function(val){
                    if(this.typeStore != null){
                        return this.typeStore.getText(val);
                    }
                    return val;
                }
            },{
                text:"链接方式",
                width:70,
                align:"center",
                menuDisabled:true,
                sortable:false,
                dataIndex:"linkTarget",
                renderer:function(val){
                    if(this.targetStore != null){
                        return this.targetStore.getText(val);
                    }
                    return val;
                }
            },{
                text:"状态",
                width:70,
                align:"center",
                menuDisabled:true,
                sortable:false,
                dataIndex:"status",
                renderer:function(val){
                    if(this.statusStore != null){
                        return this.statusStore.getText(val);
                    }
                    return val;
                }
            }],
    initComponent:function(){
        this.callParent(arguments);
    },
    setEnumTypeStore:function(type){
        this.typeStore = type;
    },
    setEnumStatusStore:function(status){
        this.statusStore = status;
    },
    setEnumTargetStore:function(target){
        this.targetStore = target;
    }
})